package com.zhangfei.utils;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class PasswordUtil {


    public static void main(String[] args) {
        String password = "123123";
        String passwordByBCryptPasswordEncoder = getPasswordByBCryptPasswordEncoder(password);
        System.out.println(passwordByBCryptPasswordEncoder);
    }

    public static String getPasswordByBCryptPasswordEncoder(String password) {
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        return encoder.encode(password);
    }
}
